package com.legal;

import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * @author xiaopeng
 * @version 1.0
 */
@SpringBootTest
public class GenerateBCryptPassword {

    public static void main(String[] args) {
        BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
        String rawPassword = "123456";
        String encodedPassword = encoder.encode(rawPassword);
        System.out.println(encodedPassword);
        // 输出示例：$2a$10$N9qo8uLOickgx2ZMRZoMy...
    }
}
